<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="java.io.*, java.sql.*, java.util.*,LS.*"%>
<%
	request.setCharacterEncoding("utf-8");
%>
<!DOCTYPE html>
<html lang="UTF-8">
<style>
th,td {
	padding-bottom: 5px;
	padding-top: 5px;
}

h4,h1 {
	margin: 0px;
	padding: 0px;
}

th {
	height: 30px;
	border-right: 1px solid #e5e5e5;
	border-bottom: 1px solid #e5e5e5;
}

tr {
	border-bottom: 1px solid #e5e5e5;
}

table {
	width: 100%;
}

.no {
	width: 7%;
}

.name {
	width: 13%;
}

.date {
	width: 15%;
}

.joinnumber {
	width: 10%;
}

#outerview {
	padding-top: 10px;
	margin-left: 0px;
	text-align: center;
	background-color: #fff;
	border: 1px solid #e5e5e5;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

#outerview {
	width: 100%;
	min-height: 600px;
	padding: 0px;
}

#middleview {
	width: 90%;
	height: 450px;
	margin: 20px auto 0px auto;
	left: 50%;
}

#innerview {
	width: 100%;
	height: 100%;
	text-align: center;
	background-color: #fff;
	border: 1px solid #e5e5e5;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

#plusview {
	margin: 10px;
	margin-bottom: 0px;
	text-align: left;
}

#write {
	text-align: right;
	padding-bottom: 3px;
}
</style>

<head>
<meta charset="utf-8">
<title>성공회대학교 기자재 대여 시스템</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- styles시트 -->
<script type="text/javascript" src="assets/se2/js/HuskyEZCreator.js"
	charset="utf-8"></script>
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="assets/css/docs.css" rel="stylesheet">
<script type="text/javascript" src="assets/js/bootstrap.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$('.dropdown-toggle').dropdown();
	});
</script>
</head>

<body data-spy="scroll" data-target=".bs-docs-sidebar">
	<!-- 메뉴
    ================================================== -->
	<%
		if (session.getAttribute("user") == null) {
	%>
	<jsp:include page="/top.do"></jsp:include>
	<%
		} else {
			Users u = (Users) session.getAttribute("user");
			if (u.getUser_position().equalsIgnoreCase("S")) {
	%>
	<!-- 학생이 로그인 했을 경우 메뉴 -->
	<jsp:include page="/studenttop.do"></jsp:include>
	<%
		} else if (u.getUser_position().equalsIgnoreCase("P")) {
	%>
	<!-- 교수가 로그인 했을 경우 메뉴 -->
	<jsp:include page="/teachertop.do"></jsp:include>
	<%
		} else {
	%>
	<!-- 관리자가 로그인 했을 경우 메뉴 -->
	<jsp:include page="/managertop.do"></jsp:include>
	<%
		}
		}
	%>
	<!-- 게시판
    ================================================== -->

	<div style="text-align: center">
		<div class="marketing"
			style="margin-bottom: 30px; color: #000; text-align: left">
			<div class="container">
				<h3 style="margin: 10px; font-size: 35px;">
					<strong>공자사항 글쓰기</strong>
				</h3>
			</div>
		</div>
	</div>
	<div class="container">
		<div id="outerview">
		
			<div id="middleview">
				<form action="notice.do" method="post">
				
					<div id="write">
						<button class="btn" onclick="submitContents();">작성하자</button>
						<input type="button" class="btn" value="목록으로"
							onclick="document.location='notice.do'">
					</div>
					
					<div>
						제목 : <input type="text" name="title" style="width: 93%;">
					</div>
					
					<div id="innerview">
						<textarea name="ir1" id="ir1" rows="10" cols="100"
							style="width: 100%; height: 412px; display: none;">
						</textarea>
					</div>
				</form>
				
				
				<div id="plusview">
					<form class="form-inline" style="text-align: right;">
						<select id="select01" style="width: 100px;">
							<option>전체</option>
							<option>제목</option>
							<option>작성자</option>
							<option>날짜</option>
						</select> <input type="text" class="input-middle" size=20>
						<button type="submit" class="btn">검색</button>
					</form>
				</div>
			</div>
		</div>
	</div>



	<!-- 꼬리말
    ================================================== -->
	<footer class="footer">
		<div class="container">
			<p>Copyright SKHU. Software Student.</p>
		</div>
	</footer>


	<!-- javascript -->
	<script src="assets/js/jquery.js"></script>
	<script type="text/javascript">
		var oEditors = [];
		nhn.husky.EZCreator.createInIFrame({
			oAppRef : oEditors,
			elPlaceHolder : "ir1",
			sSkinURI : "assets/se2/SmartEditor2Skin.html",
			htParams : {
				bUseToolbar : true, // 툴바 사용 여부 (true:사용/ false:사용하지 않음)
				bUseVerticalResizer : true, // 입력창 크기 조절바 사용 여부 (true:사용/ false:사용하지 않음)
				bUseModeChanger : true, // 모드 탭(Editor | HTML | TEXT) 사용 여부 (true:사용/ false:사용하지 않음)
				fOnBeforeUnload : function() {
					alert("아싸!");
				}
			}, //boolean
			fOnAppLoad : function() {
				//예제 코드
				//oEditors.getById["ir1"].exec("PASTE_HTML", ["로딩이 완료된 후에 본문에 삽입되는 text입니다."]);
			},
			fCreator : "createSEditor2"
		});
		
		function submitContents(elClickedObj) {
			// 에디터의 내용이 textarea에 적용된다.
			oEditors.getById["ir1"].exec("UPDATE_CONTENTS_FIELD", []);
			// 에디터의 내용에 대한 값 검증은 이곳에서.
			// document.getElementById("ir1").value를 이용해서 처리한다.
			try {
			elClickedObj.form.submit();
			} catch(e) {}
		}
	
		function pasteHTML() {
			var sHTML = "<span style='color:#FF0000;'>이미지도 같은 방식으로 삽입합니다.<\/span>";
			oEditors.getById["ir1"].exec("PASTE_HTML", [ sHTML ]);
		}
		
		function showHTML() {
			var sHTML = oEditors.getById["ir1"].getIR();
			alert(sHTML);
		}
	</script>
</body>
</html>
